import 'package:get/get.dart';

class GlobalBinding extends Bindings {
  @override
  void dependencies() {
    Get.put(Global());
  }
}

final global = Get.find<Global>();

class Global extends GetxService {
  var userId = "0".obs;
  var pets = <Map>[].obs; //宠物列表
  var currentPet = (0).obs; //当前选中宠物
  var deviceLinkState = (0).obs; //设别配网状态  0选择wifi 1配网中 2配网成功 3配网失败

  @override
  void onInit() {
    //TODO: implement onInit
    super.onInit();
    pets.add({
      'name': '二五八万',
      'type': '家猫',
      'count': '120',
    });
    pets.add({
      'name': '小鸡哥',
      'type': '英国短毛猫',
      'count': '53',
    });
  }

  @override
  void onReady() {
    // TODO: implement onReady
    super.onReady();
  }

  @override
  void onClose() {
    // TODO: implement onClose
    super.onClose();
  }
}
